-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor(NODE-5741): use async io helpers #3930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baileympearson
requested changes
Nov 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first pass review - didn't look at Connection.ts
yet and a few other misc files. Just looked over CI, utils and test changes
dariakp
requested changes
Nov 30, 2023
Co-authored-by: Daria Pardue <daria.pardue@mongodb.com>
Co-authored-by: Daria Pardue <daria.pardue@mongodb.com>
dariakp
requested changes
Dec 1, 2023
dariakp
requested changes
Dec 1, 2023
Co-authored-by: Daria Pardue <daria.pardue@mongodb.com>
dariakp
requested changes
Dec 1, 2023
Co-authored-by: Daria Pardue <daria.pardue@mongodb.com>
durran
approved these changes
Dec 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
What is changing?
Note reviewing per commit will assist greatly with following the changes made:
onMessage
which no longer exists. They can just as easily assert the same thing if they spy on the method that parses the utf8 bson optionsModernConnection
into the MongoClient constructor in newClient, this may not be 100% coverage, but substantial enough to get us to the next PRs where we will switch over to one connection class entirely.controller.abort()
ModernConnection
signal
from this controllertimeout
andclose
events will abort the controller, which will interrupt the I/O operations if they are in progressdrain
event only emits if the stream has to buffer the data to be written, the way to determine if data has been buffered is by inspecting the return value of.write
.write
's callbacknoResponse
support, I decided to return ok:1 here, now that we are using promises our types are better and I do not think there is value in having our command method return something nullishIs there new documentation needed for these changes?
No
What is the motivation for this change?
Migrating I/O to async enables us to use signals. Singals will be an essntial part of CSOT.
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript